package work.timejay.user.controller.wechat;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import work.timejay.user.utils.WeChatUtils;

import java.io.IOException;

/**
 * @className:AccessTokenController.java
 * @author:王文杰
 * @version:1.0.0
 * @description:TODO
 * @createTime 2022年04月10日 19:23:00
 */
@RestController
@RequestMapping(value = "/api/wechat/accessToken")
@Tag(name = "微信令牌接口层",description = "AccessTokenController")
public class AccessTokenController {
    /**
     * 获取AccessToken
     */
    @PostMapping()
    public String getAccessToken() throws IOException {
        return WeChatUtils.getAccessToken();
    }
}
